<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::group(['prefix' => 'admin', 'namespace' => 'Admin'], function ($api) {

	Route::post('login','UserController@login');
	
	Route::get('get_jiuzhenren','UserController@getJiuzhenren');
	
	Route::post('upload','YishengController@uploadPic');

	Route::group(['middleware' => 'token_verify'], function () {

		Route::group(['prefix' => 'keshi'], function ($api) {

			Route::get('keshi_list','KeShiController@keShiList');
			
			Route::post('edit_status','KeShiController@editStatus');
			
			Route::get('keshi_get','KeShiController@getKeshiInfo');
			
			Route::post('keshi_do','KeShiController@editKeshi');

			Route::post('add','KeShiController@addKeshi');

			Route::post('del','KeShiController@delKeshi');
		});
		
		Route::group(['prefix' => 'yisheng'], function ($api) {
		
			Route::get('yisheng_list','YishengController@yishengList');
			
			Route::post('edit_status','YishengController@editStatus');
			
			Route::get('yisheng_get','YishengController@getYishengInfo');
			
			Route::post('yisheng_do','YishengController@editYisheng');
		
			Route::post('add','YishengController@addYisheng');
		
			Route::post('del','YishengController@delYisheng');
			
		});

		Route::group(['prefix' => 'news'], function ($api) {
			
			Route::post('add','NewsController@add');
		
			Route::get('list','NewsController@list');
			
			Route::get('get','NewsController@get');
					
			Route::post('edit','NewsController@edit');
		
			Route::post('del','NewsController@del');
			
		});
		
		Route::group(['prefix' => 'news_category'], function ($api) {
			
			Route::post('add','NewsCategoryController@add');
		
			Route::get('list','NewsCategoryController@list');
			
			Route::get('get_list','NewsCategoryController@getList');
			
			Route::get('get','NewsCategoryController@get');
					
			Route::post('edit','NewsCategoryController@edit');
		
			Route::post('del','NewsCategoryController@del');
			
		});
		
		Route::group(['prefix' => 'guahao'], function ($api) {
			
			Route::get('list','GuahaoController@list');
			
			Route::post('del','GuahaoController@del');
			
		});
		
		Route::group(['prefix' => 'guahaoset'], function ($api) {
			
			Route::get('list','GuahaoController@getSetList');
			
			Route::post('add','GuahaoController@addSet');
			
			Route::post('del','GuahaoController@delSet');
			
			Route::get('get','GuahaoController@getSet');
					
			Route::post('edit','GuahaoController@editSet');

		});		
		
		
		Route::group(['prefix' => 'baogao'], function ($api) {
			
			Route::post('add','BaogaoController@add');
		
			Route::get('list','BaogaoController@list');
			
			Route::get('get','BaogaoController@get');
					
			Route::post('edit','BaogaoController@edit');
		
			Route::post('del','BaogaoController@del');
			
		});
		
		Route::group(['prefix' => 'jiuzhenren'], function ($api) {
			
			Route::get('list','JiuzhenrenController@list');
		
			Route::post('del','JiuzhenrenController@del');
			
		});
		
		Route::group(['prefix' => 'user'], function ($api) {
			
			Route::post('add','UserController@add');
		
			Route::get('list','UserController@list');
			
			Route::get('get','UserController@get');
					
			Route::post('edit','UserController@edit');
		
			Route::post('del','UserController@del');
			
		});
		
	});
});
//
